class SkillUpgradeCost {
    // 计算金币需求
    static calculateSkillUpgradeGold(baseGold: number, level: number, growthFactor: number): number {
        return Math.round(baseGold + Math.pow(level, 2) * growthFactor);
    }

    // 计算材料需求
    static calculateSkillUpgradeMaterials(baseMaterials: number, level: number, growthCycle: number): number {
        return baseMaterials + Math.floor(level / growthCycle);
    }
}

// 示例参数
const baseGold = 50; // 初始金币需求
const growthFactor = 5; // 每级增长因子
const baseMaterials = 1; // 初始材料需求
const growthCycle = 5; // 材料增长周期

// 输出第 1-20 级所需金币和材料
for (let level = 1; level <= 20; level++) {
    const gold = SkillUpgradeCost.calculateSkillUpgradeGold(baseGold, level, growthFactor);
    const materials = SkillUpgradeCost.calculateSkillUpgradeMaterials(baseMaterials, level, growthCycle);

    // console.log(`技能等级: ${level}, 金币需求: ${gold}, 材料需求: ${materials}`);
}
